using System;
using FytSoa.Common.Utils;
using System.ComponentModel.DataAnnotations;
using SqlSugar;

namespace FytSoa.Application.Erp;

/// <summary>
/// erp-销售表详细
/// </summary>
public class ErpSalesOrderItemDto : AppEntity
{
    /// <summary>
    /// 订单号
    /// </summary>
    [Required]
    public long OrderId { get; set; } = 0;

    /// <summary>
    /// 产品ID
    /// </summary>
    [Required]
    public long ProductId { get; set; } = 0;

    /// <summary>
    /// 产品信息
    /// </summary>
    public ErpProductSimpleDto Product { get; set; } = new();

    /// <summary>
    /// 数量
    /// </summary>
    [Required]
    public int Quantity { get; set; } = 0;

    /// <summary>
    /// 成交单价
    /// </summary>
    [Required]
    public decimal UnitPrice { get; set; } = 0;

    /// <summary>
    /// 折扣率(%)
    /// </summary>
    public decimal Discount { get; set; } = 0;

    /// <summary>
    /// 
    /// </summary>
    public decimal Subtotal { get; set; }

    /// <summary>
    /// 已发货数量
    /// </summary>
    public int Delivered_Qty { get; set; } = 0;


}